package com.cdd.index.controller;



import com.common.untils.CommonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/index")
public class UploadController {
    @PostMapping("/upload")
    public CommonResult upload(MultipartFile file){
        String path = com.cdd.index.config.OSSUtils.upload(file);
        return new CommonResult(2000,"上传头像成功",path);
    }
}
